<div th:fragment="column" xmlns:th="http://www.thymeleaf.org">
  <div class="fly-panel fly-column">
    <div class="layui-container">
      <ul class="layui-clear">
        <li class="layui-hide-xs layui-this"><a href="/">首页</a></li>

        <li class="layui-hide-sm layui-show-xs-inline" th:each="label:${labels}">
          <a th:href="@{'/?label=' + ${label?.id}}"><span th:text="${label?.name}"></span></a>
        </li>

        <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><span class="fly-mid"></span></li>

        <!-- 用户登入后显示 -->
        <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block" th:if="${user != null}"><a th:href="@{/user/index}">我发表的贴</a></li>
        <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block" th:if="${user != null}"><a th:href="@{/user/collection}">我收藏的贴</a></li>
      </ul>

      <div class="fly-column-right layui-hide-xs" th:if="${user != null}">
        <span class="fly-search"><i class="layui-icon"></i></span>
        <a th:href="@{/jie/add}" class="layui-btn">发表新帖</a>
      </div>
      <div class="layui-hide-sm layui-show-xs-block" style="margin-top: -10px; padding-bottom: 10px; text-align: center;" th:if="${user != null}">
        <a th:href="@{/jie/add}" class="layui-btn">发表新帖</a>
      </div>
    </div>
  </div>
</div>